GBML manual / Drawing

ANCHOR_MIDDLE_LEFT

Names the middle of the left edge of the screen, for draw_text_anchored, draw_text_warped_anchored, draw_text_3d_anchored, draw_rect_anchored and draw_rect_fill_anchored - the position you give them is measured from this spot.

Syntax

ANCHOR_MIDDLE_LEFT: constant

Description

Names the middle of the left edge of the screen. Give it to draw_text_anchored, draw_text_warped_anchored, draw_text_3d_anchored, draw_rect_anchored or draw_rect_fill_anchored as their first argument, and the position you give after it is measured from this spot. The screen anchors page explains the idea in full.

Example

draw_text_anchored(ANCHOR_MIDDLE_LEFT, 4, 0, ">");

A small arrow 4 pixels in from the left edge, halfway down the screen - the kind of marker a vertical menu uses.

On the GBA

The screen is 240 pixels wide and 160 tall, and a plain draw call in a Draw GUI event counts from its top-left pixel, so this spot is the point (0, 80) in their numbers. ANCHOR_MIDDLE_LEFT with an offset of (x, y) lands on exactly the same pixel as the plain call in a Draw GUI event (x, y + 80) - the same spot, written by what it means instead of by the size of the screen.

See also: Screen anchorsdraw_text_anchoreddraw_rect_fill_anchored